﻿<!--#include file="../Include/Config.asp"-->
<link rel="stylesheet" href="../Css/Admin.css" type="text/css" />
<%
Survey_id=request.QueryString("Survey_id")
Question_id=request.QueryString("Question_id")
sql="select * from question where Question_id="&Question_id
rs.open sql,conn,1,1
Qtype=rs("Question_type")
Question_content=rs("Question_content")
Question_answer=split(rs("Question_answer"),"&")

select case rs("Question_type")
     case "1","2": call type1()
	 case "3","4": call type2()
	 case "5": call type3()
end select
rs.close
%>
<script language="javascript" src="../Js/QuestAdd.js"></script>
<%sub type1()%>
<form name="form1" action="QuestionSave.asp?Survey_id=<%=Survey_id%>&Question_id=<%=Question_id%>&action=edit" method="post" onSubmit="return SubQuestion();">
<input type="hidden" value=<%=Qtype%> name="Question_type">
<input type="hidden" value="" name="Question_answer">
<input type="hidden" value="" name="Question_result">
问题：<input name="Question_content" type="text" size="40" value="<%=Question_content%>">
<br/><br/>
备选项：
<ul type="A" id="ulAnswer">
<%for each QueAns in Question_answer%>
<li><input type="text" name="Answer" value="<%=QueAns%>"></li>
<%next%>
</ul>
<div id="button">
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="button2" type="button" value="关闭窗口" onClick="window.close();">
</div>
</form>
<%end sub%>

<%sub type2()%>
<form name="form1" action="QuestionSave.asp?Survey_id=<%=Survey_id%>&Question_id=<%=Question_id%>&action=edit" method="post" onSubmit="return SubQuestion();">
<input type="hidden" value=<%=Qtype%> name="Question_type">
<input type="hidden" value="" name="Question_answer">
<input type="hidden" value="" name="Question_result">
问题：<input name="Question_content" type="text" size="40" value="<%=Question_content%>">
<br/><br/>
备选项：
<ul type="A" id="ulAnswer">
<%for i=0 to (ubound(Question_answer)-1)%>
<li><input type="text" name="Answer" value="<%=Question_answer(i)%>"></li>
<%next%>
<li><input type="text" name="Answer" value="<%=Question_answer(ubound(Question_answer))%>"><input type="text" name="Answer_2" readonly="true" value="用户在此框输入自定义文本"></li>
</ul>
<div id="button">
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="button2" type="button" value="关闭窗口" onClick="window.close();">
</div>
</form>
<%end sub%>

<%sub type3()%>
<form name="form1" action="QuestionSave.asp?Survey_id=<%=Survey_id%>&Question_id=<%=Question_id%>&action=edit" method="post" onSubmit="return SubQuestion();">
<input type="hidden" value=<%=Qtype%> name="Question_type">
<input type="hidden" value="" name="Question_answer">
<input type="hidden" value="" name="Question_result">
问题：<br/><input name="Question_content" type="text" size="40" value="<%=Question_content%>">
<br/><br/>
回答框：<br/>
<textarea rows="3" readonly="readonly"></textarea>
<br/><br/>
<div id="button">
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="button2" type="button" value="关闭窗口" onClick="window.close();">
</div>
</form>
<%end sub%>
